package com.zhida.common.entity;

import lombok.*;

import java.io.Serializable;
import java.util.*;

/**
 * Create by zhh 2024/7/16 1:09
 */
@Getter
@Setter
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MessageContainer implements Serializable {
    // 获取所有用户的消息
    private List<OfflineMessage> offlineMessages;


    // 添加消息到指定的用户列表
    public void addMessagesForUser(OfflineMessage offlineMessage) {
        if (offlineMessages == null) {
            offlineMessages = new ArrayList<>();
        }
        offlineMessages.add(offlineMessage);
//

    }

}
